package com.ly.Controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
@RequestMapping("consumer")
public class OrderController {

    public final String GETZK_URL = "http://cloud-provider-payment/payment";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("payment/getZk")
    public String create() {

        return restTemplate.getForObject(GETZK_URL+"/zk", String.class);
    }
}
